package com.lc.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.lc.bean.Store;
import com.lc.mapper.StoreMapper;
import com.lc.service.StoreService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StoreServiceImpl implements StoreService {


    @Autowired
    StoreMapper storeMapper;

    @Override
    public PageInfo<Store> list(Integer pageNum, Integer pageSize) {
        PageHelper.startPage(pageNum,pageSize);
        List<Store> stores = storeMapper.list();
        return new PageInfo<Store>(stores);
    }

}
